package entities;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;


public class Main {
	EntityManagerFactory emf;
	EntityManager em;
	
	
	public Main() {
		super();
		emf = Persistence.createEntityManagerFactory("PhaseBookDS");
        em = emf.createEntityManager();
	}	
	
	private void getLindenMovementsTypes() {
		EntityTransaction tx = em.getTransaction();
		tx.begin();
		
		Lindenmovementstype mType = new Lindenmovementstype();
        
		mType.setDescription("Test 1");
        
        em.persist(mType);
        
        tx.commit();
		
	}
		
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Main me = new Main();
		
		me.getLindenMovementsTypes();

	}

}
